﻿using System;

namespace FastData.Caching
{
    public class TableDependency
    {
        public string TableName;
        public string Id;

        public TableDependency(string tableName)
        {
            this.TableName = tableName;
        }

        public TableDependency(string tableName, string id)
        {
            this.TableName = tableName;
            this.Id = id;
        }

        public bool Equals(TableDependency obj)
        {
            return obj == null ? false : TableName.Equals(obj.TableName, StringComparison.OrdinalIgnoreCase) && string.Equals(Id, obj.Id);
        }
    }

}
